//
//  DrawerViewController.m
//  成都咖啡
//
//  Created by rimi on 16/3/23.
//  Copyright © 2016年 wenhao. All rights reserved.
//

#import "DrawerViewController.h"
#import "DefaultsInForCenter.h"
#import "ShoppingDetailViewController.h"


@interface DrawerViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (strong, nonatomic) IBOutlet UIView *containerView;
@property (nonatomic,strong)ShoppingDetailViewController *shoppingDVC;
@property  (nonatomic,strong)NSArray *dataSourceForShoppingDVC; /**< 抽屉数据源 */
@property (strong, nonatomic) IBOutlet UITableView *tableView;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *containerLeftConstraint;

@end

@implementation DrawerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initializeDataSource];
    [self initializeInterface];
   
}

- (void)initializeDataSource{
    _dataSourceForShoppingDVC = @[@"电话",@"留言",@"收藏",@"分享"];
    
}

- (void)initializeInterface{
  

}



#pragma make ********** << <UITableViewDataSource,UITableViewDelegate>  **********
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return _dataSourceForShoppingDVC.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString    *  identifyCell = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifyCell];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifyCell];
        cell.textLabel.text = _dataSourceForShoppingDVC[indexPath.row];
    }
    return cell;
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"dfdg");
    //归位
//    [DefaultsInForCenter defaultsInforCenter].isLeftMenuShow = ![DefaultsInForCenter defaultsInforCenter].isLeftMenuShow;
//    _shoppingDVC.view.center = self.view.center;
//   
//    self.tabBarController.tabBar.hidden = YES;
   
}




@end
